#include <iostream>
#include "simulator/tools/bitTools.h"
#include "dspSimulator/dspSimulator/dspSimulator.h"

using namespace dspsimulator;
using namespace simulator;

int main() {
    auto dsp_machine = std::make_shared<DspMachine>();
    std::shared_ptr<LLVMJit> llvmJit = std::make_shared<LLVMJit>();
    const char *filePath = "/home/zengao/Desktop/dsp-simulator-dynamic-translate/test_file/TEST_1.out";
    std::shared_ptr<simulator::ELF32Loader> elfLoader = std::make_shared<simulator::ELF32Loader>(filePath);

    auto dsp_simulator = std::make_shared<dspsimulator::DSPSimulator>(dsp_machine, llvmJit, elfLoader);

    std::string pc_name = get_reg_name(dspsimulator::RegKind::PC);
    u32 pc = 0xc000000;
    dsp_machine->registers()->get_reg32(pc_name)->set_data(pc);
    auto memory = dsp_machine->mmu()->memory();
    dsp_simulator->run();
}